<link href="__PUBLIC__/home/css/style.css" rel="stylesheet">
<link href="__PUBLIC__/home/css/style-responsive.css" rel="stylesheet">
<link href="__PUBLIC__/home/css/bootstrap.min.css" rel="stylesheet"> 
 <include file="application/home/view/public/header.html"/>
      <!-- /.aside -->
      <section id="content">
        <div class="wrapper">
            <div class="mail-box">
                <aside class="mail-nav mail-nav-bg-color">
                    <header class="header"> <h4>邮箱</h4> </header>
                    <div class="mail-nav-body">
                        <div class="text-center">
                            <a class="btn btn-compose" href="{:U('Mail/send')}">
                                撰写邮件
                            </a>
                        </div>
                        <ul class="nav nav-pills nav-stacked mail-navigation">
                            <li class="active">
                            	<a href="{:U('Mail/index')}"> 
                            		<i class="fa fa-inbox"></i>
                            		收信箱  
                            		<span class="label label-danger pull-right inbox-notification">{$wcount}</span>
                            	</a>
                            </li>
                            <li><a href="{:U('Mail/inbox')}"> <i class="fa fa-envelope-o"></i> 发信箱</a></li>
                            <li><a href="#"> <i class="fa fa-trash-o"></i>回收站</a></li>
                        </ul>

                        
                    </div>
                </aside>
                <section class="mail-box-info">
                    <header class="header">
                        <div class="compose-btn pull-right">
                            <button class="btn btn-primary btn-sm"><i class="fa fa-check" onclick="sub()"></i> 发送</button>
                            <button class="btn btn-sm btn-default"><i class="fa fa-times"></i> 重写</button>
                        </div>
                        <div class="btn-toolbar">
                            <h4 class="pull-left">
                                Compose Mail
                            </h4>
                        </div>

                    </header>

                    <section class="mail-list">
                        <div class="compose-mail">
                                <div class="form-group">
                                    <label for="to" class="">收件人:</label>
                                    <input type="text" tabindex="1" id="account" name="account" class="form-control">
                                </div>
                                <div class="form-group">
                                    <label for="subject" class="">标题:</label>
                                    <input type="text" tabindex="1" id="title" name="title" class="form-control">
                                </div>

                                <div class="compose-editor">
                                    <textarea class="wysihtml5 form-control" rows="9" id="conten" name="content"></textarea>
                                </div>
                                <hr/>
                                <div class="compose-btn">
                                    <button class="btn btn-primary btn-sm" onclick="sub()"><i class="fa fa-check"></i> 发送</button>
                                    <button class="btn btn-sm btn-default"><i class="fa fa-times"></i> 重写</button>
                                </div>
                        </div>
                    </section>
                </section>
            </div>
        </div>
    </section>
  </section>
</section>
<script src="__PUBLIC__/home/js/app.v2.js"></script>
 <!-- Bootstrap --> <!-- App --> 
 <script src="__PUBLIC__/home/js/charts/easypiechart/jquery.easy-pie-chart.js" cache="false"></script>
 <script src="__PUBLIC__/home/js/charts/sparkline/jquery.sparkline.min.js" cache="false"></script> 
 <script src="__PUBLIC__/home/js/charts/flot/jquery.flot.min.js" cache="false"></script> 
 <script src="__PUBLIC__/home/js/charts/flot/jquery.flot.tooltip.min.js" cache="false"></script> 
 <script src="__PUBLIC__/home/js/charts/flot/jquery.flot.resize.js" cache="false"></script> 
 <script src="js/charts/flot/jquery.flot.grow.js" cache="false"></script> 
 <script src="__PUBLIC__/home/js/charts/flot/demo.js" cache="false"></script> 
 <script src="__PUBLIC__/home/js/calendar/bootstrap_calendar.js" cache="false"></script> 
 <script src="__PUBLIC__/home/js/calendar/demo.js" cache="false"></script> 
 <script src="__PUBLIC__/home/js/sortable/jquery.sortable.js" cache="false"></script>
 <script src="__PUBLIC__/js/layer/layer.js" type="text/javascript"></script>
</body>
</html>
<script type="text/javascript">
	function sub(){
	var url = "{:U('Mail/insert')}";
	var account = $('#account').val();
	var title = $('#title').val();
	var content = $('#conten').val();

	$.post(url,{'account':account,'title':title,'content':content},function(data){
		layer.msg(data.info);
		if(data.status == 1){	
			setTimeout(function(){
				 window.location.reload();
			}, 3000);
		}
	});
}
</script>









        